package com.jsgt.greekfire.bean

import android.os.Parcel
import android.os.Parcelable

/**
 * author fhx
 * create time 2020/4/28 15:51
 **/
class WalletInfoBean() : Parcelable {
    //var guid: String? = null
    //var userGuid: String? = null
    //var helpStr: String? = null
    //var address: String? = null
    var utiAddress: String? = null
    //var priKey: String? = null
    //var pubKey: String? = null
    //var securityPassword: String? = null
    //var payPassword: String? = null
    var walletName: String? = null
    var walletLevel:Int? = null//0是矿工，否则是超级节点
    var status: Int? = null//1.未激活 2.已激活

    constructor(parcel: Parcel) : this() {
        utiAddress = parcel.readString()
        walletName = parcel.readString()
        walletLevel = parcel.readValue(Int::class.java.classLoader) as? Int
        status = parcel.readValue(Int::class.java.classLoader) as? Int
    }

    override fun writeToParcel(parcel: Parcel, flags: Int) {
        parcel.writeString(utiAddress)
        parcel.writeString(walletName)
        parcel.writeValue(walletLevel)
        parcel.writeValue(status)
    }

    override fun describeContents(): Int {
        return 0
    }

    companion object CREATOR : Parcelable.Creator<WalletInfoBean> {
        override fun createFromParcel(parcel: Parcel): WalletInfoBean {
            return WalletInfoBean(parcel)
        }

        override fun newArray(size: Int): Array<WalletInfoBean?> {
            return arrayOfNulls(size)
        }
    }


}